import { Mt, MtEntity } from '@/api/manager/mt'
import { ListChildComponentProps } from 'react-window'
/**轮询终端*/
export interface TerMode {
	mcc: Mt
	status: {
		checked: boolean
	}
	mtKey: Mt['mtKey']
	number: string
}
/**
 * 转换轮询终端拖拽转换终端
 * @param source 轮询终端
 * @returns 展示数据
 */
export const ListTranslator = (source: Array<MtEntity>): TerMode[] => {
	return source.map((item) => {
		const mt = item
		return {
			mcc: new Mt(mt),
			status: {
				checked: false,
			},
			mtKey: mt.mt_key,
			number: '',
		}
	})
}
//拖拽终端参数
export interface terminalEntity {
	mts: TerMode[]
	from: string | undefined
	dropIndex: number
}
/**接口返回预案实体 */
export type PlanResponseEntity = Array<{
	name: string
	id: string
}>
/**转换后预案数据*/
export type PlanEntity = Array<{
	label: string
	value: string
}>
/**comted消息推送mcc_meeting_mix*/
export interface MixCometd {
	name: string
	mode: 1 | 2
	state: 0 | 1
	members: Array<MtEntity>
}
export interface RowRendererProps extends ListChildComponentProps {
	data: Array<TerMode>
}
